<?php
$oddname = array(0 => "和", 1 => "<font color='#BB00AA'>单</font>", 2 => "<font color='#0077AA'>双</font>");
$bigname = array(0 => "和", 1 => "<font color='#BB00AA'>大</font>", 2 => "<font color='#0077AA'>小</font>", 3 => "<font color='chocolate'>中</font>");

$table='
<table  class="le_td3" width="235" border="0" cellpadding="0" cellspacing="0">
	<tr>
	  <td class="left_td3" height="25" width="25" align="center">期数</td>
	  <td class="left_td3" width="25" align="center">一球</td>
	  <td class="left_td3" width="25" align="center">二球</td>
	  <td class="left_td3" width="25" align="center">三球</td>
	  <td class="left_td3" width="25" align="center">四球</td>
	  <td class="left_td3" width="25" align="center">五球</td>
	</tr>
<tbody>';
$table1=$table2=$table3=$table4="";
$rs = getdb("select n1,n2,n3,n4,n5,round,p5sd,p4sd,p3sd,p2sd,p1sd,p5bs,p4bs,p3bs,p2bs,p1bs,p5pc,p4pc,p3pc,p2pc,p1pc from lotto_".$tbl." where startbet<='" . date("Y-m-d H:i:s") . "' and n1>=0 order by startbet desc limit 10");
while(!$rs->eof)
{
	$table1.='<tr class="row1" style="font-weight:bold">
				<td class="left_td3 co " width="25" align="center">'.n3($rs->f["round"]).'</td>
				<td class="left_td3" width="25" align="center">'.$rs->f["n5"].'</td>
				<td class="left_td3" width="25" align="center">'.$rs->f["n4"].'</td>
				<td class="left_td3" width="25" align="center">'.$rs->f["n3"].'</td>
				<td class="left_td3" width="25" align="center">'.$rs->f["n2"].'</td>
				<td class="left_td3" width="25" align="center">'.$rs->f["n1"].'</td>
			  </tr>';
	$table2.='<tr class="row1">
				<td class="left_td3 co "  width="25" align="center">'.n3($rs->f["round"]).'</td>
				<td class="left_td3"  width="25" align="center">'.$MyLotto_3d->showText($rs->f['p5bs'], "bs").'</td>
				<td class="left_td3 " width="25" align="center">'.$MyLotto_3d->showText($rs->f['p4bs'], "bs").'</td>
				<td class="left_td3 " width="25" align="center">'.$MyLotto_3d->showText($rs->f['p3bs'], "bs").'</td>
				<td class="left_td3 " width="25" align="center">'.$MyLotto_3d->showText($rs->f['p2bs'], "bs").'</td>
				<td class="left_td3 " width="25" align="center">'.$MyLotto_3d->showText($rs->f['p1bs'], "bs").'</td>
			  </tr>';
	$table3.='<tr class="row1">
				<td class="left_td3 co " width="25" align="center">'.n3($rs->f["round"]).'</td>
				<td class="left_td3"  width="25" align="center">'.$MyLotto_3d->showText($rs->f['p5sd'], "sd").'</td>
				<td class="left_td3 " width="25" align="center">'.$MyLotto_3d->showText($rs->f['p4sd'], "sd").'</td>
				<td class="left_td3 " width="25" align="center">'.$MyLotto_3d->showText($rs->f['p3sd'], "sd").'</td>
				<td class="left_td3 " width="25" align="center">'.$MyLotto_3d->showText($rs->f['p2sd'], "sd").'</td>
				<td class="left_td3 " width="25" align="center">'.$MyLotto_3d->showText($rs->f['p1sd'], "sd").'</td>
			  </tr>';
	$table4.='<tr class="row1">
				<td class="left_td3 co " width="25" align="center">'.n3($rs->f["round"]).'</td>
				<td class="left_td3"  width="25" align="center">'.$MyLotto_3d->showText($rs->f['p5pc'], "pc").'</td>
				<td class="left_td3 " width="25" align="center">'.$MyLotto_3d->showText($rs->f['p4pc'], "pc").'</td>
				<td class="left_td3 " width="25" align="center">'.$MyLotto_3d->showText($rs->f['p3pc'], "pc").'</td>
				<td class="left_td3 " width="25" align="center">'.$MyLotto_3d->showText($rs->f['p2pc'], "pc").'</td>
				<td class="left_td3 " width="25" align="center">'.$MyLotto_3d->showText($rs->f['p1pc'], "pc").'</td>
			  </tr>';
	$rs->movenext();
}
$rs->close();
$content='<div class="ShowOpen" id="ShowOpen_0">'.$table.$table1."</tbody></table></div>";
$content.='<div class="ShowOpen" id="ShowOpen_1" style="display:none">'.$table.$table2."</tbody></table></div>";
$content.='<div class="ShowOpen" id="ShowOpen_2" style="display:none">'.$table.$table3."</tbody></table></div>";
$content.='<div class="ShowOpen" id="ShowOpen_3" style="display:none">'.$table.$table4."</tbody></table></div>";
$table=$content;
?>